package com.polymorphic.polyarry;

/**
 * @Author 小闽
 * @Date 2024/8/13 9:33
 * @PackageName: com.polymorphic.polyarry
 * @ClassName: Student
 * @Description: 学生类
 * @Version 1.0
 */
public class Student extends Person {
    private double score;

    public Student(String name, int age, double score) {
        super(name, age);
        this.score = score;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    @Override
    public String say() {
        return super.say() + "score=" + score;
    }
    // 特有方法
    public void study(){
        System.out.println("学生" + getName() + "正在学java课程");
    }
}
